package org.topdowntdd.sample.appfusemodularstruts.webapp.action;

import org.jmock.Mockery;
import org.jmock.integration.junit4.JUnit4Mockery;
import org.jmock.lib.legacy.ClassImposteriser;
import org.junit.Before;

import junit.framework.TestCase;

public abstract class BaseMockActionTestCase extends TestCase {

	protected Mockery context;

	public BaseMockActionTestCase() {
		super();
	}

	protected abstract void setUpAction();

	protected abstract void setUpDependencies();

	public BaseMockActionTestCase(String name) {
		super(name);
	}

	@Override
	@Before
	protected void setUp() throws Exception {
		super.setUp();
		
		context = new JUnit4Mockery(){{
			setImposteriser(ClassImposteriser.INSTANCE);
		}};
		
		setUpDependencies();
		
		setUpAction();
	}

}